﻿using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HlELock.Domain.Entities
{
    /// <summary>
    /// 本地用户信息
    /// </summary>
    public class LocalUser: EntityBase
    {
        /// <summary>
        /// 登录帐号
        /// </summary>
        [MaxLength(32)]
        public string Account { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [MaxLength(64)]
        public string Password { get; set; }

        /// <summary>
        /// 名字
        /// </summary>
        [MaxLength(32)]
        public string Name { get; set; }

        /// <summary>
        /// 角色
        /// </summary>
        [MaxLength(8)]
        public LocaUserRole Role { get; set; }

        /// <summary>
        /// 岗位
        /// </summary>
        [MaxLength(12)]
        public string Post { get; set; }
    }
    public enum LocaUserRole 
    {
        普通用户,
        管理员
    }
}
